
* Clean raw data
clear 
set more off

import delimited ./RawData/default.csv, case(preserve) 

label define vlR0002101   1 "1"  2 "2"  3 "3"  4 "4"  5 "5"  6 "6"  7 "7"  8 "8"  9 "9"  10 "10"  11 "11"  12 "12"  13 "13"  14 "14"  15 "15"  16 "16"
label values R0002101 vlR0002101
label define vlR0002102   0 "0"
label values R0002102 vlR0002102
label define vlR0002200   30 "30"  31 "31"  32 "32"  33 "33"  34 "34"  35 "35"  36 "36"  37 "37"  38 "38"  39 "39"  40 "40"  41 "41"  42 "42"  43 "43"  44 "44"  45 "45"
label values R0002200 vlR0002200
label define vlR0002203   22 "22"  23 "23"  24 "24"  25 "25"  26 "26"  27 "27"  28 "28"  29 "29"  30 "30"  31 "31"  32 "32"  33 "33"  34 "34"  35 "35"  36 "36"  37 "37"
label values R0002203 vlR0002203
label define vlR0002300   1 "WHITE"  2 "BLACK"  3 "OTHER"
label values R0002300 vlR0002300
label define vlR0002400   1 "MARRIED SPOUSE PRESENT"  2 "MARRIED SPOUSE ABSENT"  3 "WIDOWED"  4 "DIVORCED"  5 "SEPARATED"  6 "NEVER MARRIED"
label values R0002400 vlR0002400
label define vlR0002401   1 "INITIAL YEAR(1967)"  2 "MOVER"  3 "NONMOVER"  4 "NONINTERVIEW"
label values R0002401 vlR0002401
label define vlR0002405   1 "IN SMSA:  IN CENTRAL CITY"  2 "IN SMSA:  NOT IN CENTRAL CITY"  3 "NOT IN SMSA"
label values R0002405 vlR0002405
label define vlR0002406   1 "LIVES IN SOUTH"  0 "LIVES IN NON-SOUTH"
label values R0002406 vlR0002406
label define vlR0002800   1 "NEW ENGLAND"  2 "MIDDLE ATLANTIC"  3 "EAST NORTH CENTRAL"  4 "WEST NORTH CENTRAL"  5 "SOUTH ATLANTIC"  6 "EAST SOUTH CENTRAL"  7 "WEST SOUTH CENTRAL"  8 "MOUNTAIN"  9 "PACIFIC"
label values R0002800 vlR0002800
label define vlR0004200   1 "WORKING"  2 "WITH JOB, BUT NOT AT WORK"  3 "LOOKING FOR WORK"  4 "GOING TO SCHOOL"  5 "KEEPING HOUSE"  6 "UNABLE TO WORK"  7 "OTHER"
label values R0004200 vlR0004200
label define vlR0007300   555 "555: MEMBERS OF THE ARMED FORCES"  995 "995: OCCUPATION NOT REPORTED"  999 "999: DON'T KNOW"
label values R0007300 vlR0007300
label define vlR0018600   1 "SELF-EMPLOYED (ITEM 6D)"  2 "PRIVATE, GOVERNMENT OR WITHOUT PAY (ITEM 6D)"
label values R0018600 vlR0018600
label define vlR0037500   0 "NONE"  1 "FIRST GRADE"  2 "SECOND GRADE"  3 "THIRD GRADE"  4 "FOURTH GRADE"  5 "FIFTH GRADE"  6 "SIXTH GRADE"  7 "SEVENTH GRADE"  8 "EIGHTH GRADE"  9 "NINTH GRADE"  10 "TENTH GRADE"  11 "ELEVENTH GRADE"  12 "TWELFTH GRADE"  13 "FIRST YEAR COLLEGE"  14 "SECOND YEAR COLLEGE"  15 "THIRD YEAR COLLEGE"  16 "FOURTH YEAR COLLEGE"  17 "FIFTH YEAR COLLEGE"  18 "SIXTH+ YEARS COLLEGE"  96 "ELEMENTARY, YEAR UNSPECIFIED"  97 "HIGH SCHOOL, YEAR UNSPECIFIED"  98 "COLLEGE, YEAR UNSPECIFIED"  93 "KINDERGARTEN"  94 "PRESCHOOL"  95 "NONACADEMIC DEGREE OR DIPLOMA EDUCATIONAL PROGRAM"  99 "GED"
label values R0037500 vlR0037500
label define vlR0037600   1 "YES"  0 "NO"
label values R0037600 vlR0037600
label define vlR0044900   0 "0"
label values R0044900 vlR0044900
label define vlR0045700   0 "0"
label values R0045700 vlR0045700
label define vlR0049800   1 "SAME STATE AS CURRENT RESIDENCE"  2 "DIFFERENT STATE, SAME REGION"  3 "DIFFERENT REGION - NORTHEAST"  4 "DIFFERENT REGION - NORTH CENTRAL"  5 "DIFFERENT REGION - SOUTH"  6 "DIFFERENT REGION - WEST"  7 "OUTSIDE U.S."
label values R0049800 vlR0049800
label define vlR0049900   1 "LESS THAN 1 YEAR"  2 "1 YEAR OR MORE"  3 "ALL MY LIFE"
label values R0049900 vlR0049900
label define vlR0050400   1 "U.S. OR CANADA"  2 "NORTH OR WEST EUROPE (AUSTRIA, BELGIUM, DENMARK, ENGLAND, FRANCE, GERMANY, ICELAND, IRELAND, LUXEMBOURG, NETHERLANDS, NORTHERN IRELAND, NORWAY, SCOTLAND, SWEDEN, SWITZERLAND, WALES)"  3 "CENTRAL OR EASTERN EUROPE (ALBANIA, BULGARIA, CZECHOSLOVAKIA, ESTONIA, FINLAND, HUNGARY, LATVIA, LITHUANIA, POLAND, RUMANIA, U.S.S.R., YUGOSLAVIA)"  4 "SOUTHERN EUROPE (ANDORRA, AZORES, GIBRALTAR, GOZO, GREECE, ITALY, LIECHTENSTEIN, MALTA, MONACO, PORTUGAL, SAN MARINO, SPAIN, TRIESTE, VATICAN CITY, EUROPE - COUNTRY NOT SPECIFIED)"  5 "LATIN AMERICA (MEXICO, CENTRAL AMERICA, SOUTH AMERICA)"  6 "OTHER"
label values R0050400 vlR0050400
label define vlR0050500   1 "U.S. OR CANADA"  2 "NORTH OR WEST EUROPE (AUSTRIA, BELGIUM, DENMARK, ENGLAND, FRANCE, GERMANY, ICELAND, IRELAND, LUXEMBOURG, NETHERLANDS, NORTHERN IRELAND, NORWAY, SCOTLAND, SWEDEN, SWITZERLAND, WALES)"  3 "CENTRAL OR EASTERN EUROPE (ALBANIA, BULGARIA, CZECHOSLOVAKIA, ESTONIA, FINLAND, HUNGARY, LATVIA, LITHUANIA, POLAND, RUMANIA, U.S.S.R., YUGOSLAVIA)"  4 "SOUTHERN EUROPE (ANDORRA, AZORES, GIBRALTAR, GOZO, GREECE, ITALY, LIECHTENSTEIN, MALTA, MONACO, PORTUGAL, SAN MARINO, SPAIN, TRIESTE, VATICAN CITY, EUROPE - COUNTRY NOT SPECIFIED)"  5 "LATIN AMERICA (MEXICO, CENTRAL AMERICA, SOUTH AMERICA)"  6 "OTHER"
label values R0050500 vlR0050500
label define vlR0051000   1 "ON A FARM OR RANCH"  2 "IN THE COUNTRY, NOT ON FARM OR RANCH"  3 "IN A TOWN OR SMALL CITY (UNDER 25,000)"  4 "IN THE SUBURB OF A LARGE CITY"  5 "IN A CITY OF 25,000 - 100,000"  6 "IN A LARGE CITY (100,000 OR MORE)"
label values R0051000 vlR0051000
label define vlR0051100   1 "FATHER AND MOTHER"  2 "FATHER AND STEP-MOTHER"  3 "MOTHER AND STEP-FATHER"  4 "FATHER (ONLY)"  5 "MOTHER (ONLY)"  6 "SOME OTHER ADULT MALE RELATIVE"  7 "SOME OTHER ADULT FEMALE RELATIVE"  8 "ON HER OWN"  9 "SOME OTHER ARRANGEMENT"
label values R0051100 vlR0051100
label define vlR0051200   555 "555: MEMBERS OF THE ARMED FORCES"  995 "995: OCCUPATION NOT REPORTED"  999 "999: DON'T KNOW"
label values R0051200 vlR0051200
label define vlR0051300   1 "YES"  0 "NO"
label values R0051300 vlR0051300
label define vlR0068700   3 "3"  4 "4"  5 "5"  6 "6"  7 "7"  8 "8"  9 "9"  10 "10"  11 "11"  12 "12"  13 "13"  14 "14"  15 "15"  16 "16"  17 "17"  18 "18"
label values R0068700 vlR0068700
label define vlR0069100   555 "555: MEMBERS OF THE ARMED FORCES"  995 "995: OCCUPATION NOT REPORTED"  999 "999: DON'T KNOW"
label values R0069100 vlR0069100
label define vlR0070600   1 "WORKING"  2 "WITH JOB, NOT AT WORK"  3 "UNEMPLOYED"  4 "GOING TO SCHOOL"  5 "KEEPING HOUSE"  6 "UNABLE TO WORK"  7 "CODE 7 IS NOT USED"  8 "OTHER"  0 "NEVER WORKED"
label values R0070600 vlR0070600
label define vlR0080000   0 "0"
label values R0080000 vlR0080000
label define vlR0080800   1 "U.S. OR CANADA"  2 "NORTH OR WEST EUROPE"  3 "CENTRAL OR EASTERN EUROPE"  4 "SOUTHERN EUROPE"  5 "LATIN AMERICA"  6 "OTHER"
label values R0080800 vlR0080800
label define vlR0085500   1 "UNDER $2,000"  2 "$2,000 - 2,999"  3 "$3,000 - 3,999"  4 "$4,000 - 4,999"  5 "$5,000 - 5,999"  6 "$6,000 - 6,999"  7 "$7,000 - 7,999"  8 "$8,000 - 9,999"  9 "$10,000 - 14,999"  10 "$15,000 - 24,999"  11 "$25,000 AND OVER"
label values R0085500 vlR0085500


compress 
save ./RawData/NLS_MW_raw.dta, replace
